package com.fastshopping.order.controller;
import com.wink.entity.Result;
import com.wink.entity.StatusCode;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/*
 * @Author zhangdan
 * @Description //TODO 全局异常处理器
 * @Date 17:13 2020/6/1
 * @Param 
 * @return 
 **/
@ControllerAdvice
public class BaseExceptionHandler {
	
    @ExceptionHandler(value = Exception.class)
    @ResponseBody
    public Result error(Exception e){
        e.printStackTrace();        
        return new Result(false, StatusCode.ERROR, "执行出错");
    }
}
